package com.lzb.randomturntable.adapter;

import androidx.annotation.NonNull;

import com.chad.library.adapter.base.provider.BaseItemProvider;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.lzb.basic.ProviderMultiAdapter;
import com.lzb.randomturntable.R;

public class RandomNumberAdapter extends ProviderMultiAdapter<String> {

    public RandomNumberAdapter() {
        addItemProvider(new RandomNumberProvider());
    }

    private class RandomNumberProvider extends BaseItemProvider<String> {
        @Override
        public int getItemViewType() {
            return ProviderMultiAdapter.TYPE_VIEW;
        }

        @Override
        public int getLayoutId() {
            return R.layout.item_random_number;
        }

        @Override
        public void convert(@NonNull BaseViewHolder baseViewHolder, String bean) {
            baseViewHolder.setText(R.id.tvRandomNumberItemNum, bean);
        }
    }
}